<?php
namespace app\common\model\mysql;

use think\Model;

class BaseModel extends Model
{
    protected $autoWriteTimestamp = true;

    public function updateById($id, $data)
    {
        $data['update_time'] = time();
        return $this->where(['id' => $id])->save($data);
    }
}